package by.semerikov.parser;

import by.semerikov.parts.HttpVersion;

public class HttpVersionParser implements IStringParser<HttpVersion> {

	@Override
	public HttpVersion getObject(String line) {
		HttpVersion result = new HttpVersion();
		String[] array = line.split("/");
		result.setHeader(array[0]);
		result.setVersion(Double.parseDouble(array[1]));
		return result;
	}

}
